package cn.itsource.crm.service.impl;

import cn.itsource.crm.domain.Employee;
import cn.itsource.crm.mapper.EmployeeMapper;
import cn.itsource.crm.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl extends BaseServiceImpl<Employee> implements IEmployeeService {

    @Autowired
    EmployeeMapper employeeMapper;

    @Override
    public Employee getByUsername(String username) {
        return employeeMapper.getByUsername(username);
    }

    @Override
    public List<Employee> findAllByTenant(Long tenantId) {
        return employeeMapper.findAllByTenant(tenantId);
    }

    @Override
    public void employeeBindRole(Employee employee) {
        employeeMapper.employeeBindRole(employee);
    }
}
